from AI import *

class AIFromString(AI):
    
    def __init__(self, ai_string):
        self.ai_string = ai_string
    
    def chooseMove(self, board):
        
        exec self.ai_string
        
    def toString(self):
        return self.ai_string

if __name__ == "__main__":
    """ This is a debugging and testing function """
    x = AIFromString("print 'this is a test'\nwhile 1:\n\tprint 'tammy\\n'\n")
    x.chooseMove(2)